import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory('/'),
  routes: [
    {
      path: '/',
      name: 'HomePage',
      component: () => import('@/views/index.vue')
    }
  ]
})

router.beforeEach((to, from, next) => {
  localStorage.setItem('path', to.path as string)
  next()
})

export default router
